#include "game.h"

QString platform = "X";

WindowImp *WindowSystemFactory::MakeWindowImp()
{
    // 模拟环境变量等
    if(platform == "X")
    {
        return new XWindowImp;
    }
    else if(platform == "PM")
    {
        return new PMWindowImp;
    }
    return new WindowImp;
}

QString ApplicationWindow::draw()
{
    WindowImp* imp = GetWindowImp();
    return imp->DeviceDraw();
}

QString IconWindow::draw()
{
    WindowImp* imp = GetWindowImp();
    return imp->DeviceDrawIcon();
}
